/*
 * Class from CKS-Tagcloud 
 */

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Microsoft.SharePoint.WebPartPages;
using System.Xml.Serialization;
using System.Web.UI.HtmlControls;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Security;
using Microsoft.SharePoint.Utilities;
using Microsoft.SharePoint.WebControls;
using System.Collections;
using System.Globalization;

namespace BDF.TagCloud
{
    static class Helper
    {

        public static int GetTagWeight(int Count, int MaxCount)
        {
            double Percent = (double)((Count * 100) / MaxCount);

            if (Percent > 90)
            {
                return 1;
            }
            else if (Percent > 70)
            {
                return 2;
            }
            else if (Percent > 50)
            {
                return 3;
            }
            else if (Percent > 30)
            {
                return 4;
            }
            else if (Percent > 10)
            {
                return 5;
            }
            else
            {
                return 6;
            }
        }

        
        
    }
}
